<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/common/taglib.jsp"%>
<%@ include file="/WEB-INF/common/header.jsp"%>

<div>
	<div class="layui-fluid">
		<div class="layui-row layui-col-space1">
			<div class="layui-col-md12">
				<div class="layui-form-query">
					<form class="layui-form" id="query_form">
						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-mid">accessKey：</label>
								<div class="layui-input-inline" style="width: 120px;">
									<input type="tel" name="accessKeyId" autocomplete="off" class="layui-input" placeholder="模糊查询" />
								</div>
							</div>
							
							<div class="layui-inline">
								<label class="layui-form-mid">secret：</label>
								<div class="layui-input-inline" style="width: 120px;">
									<input type="text" name="accessKeySecret" autocomplete="off" class="layui-input" placeholder="模糊查询" />
								</div>
							</div>
							
							<div class="layui-inline">
								<label class="layui-form-mid">描述说明：</label>
								<div class="layui-input-inline" style="width: 120px;">
									<input type="text" name="notice" autocomplete="off" class="layui-input" placeholder="模糊查询" />
								</div>
							</div>
							
							<div class="layui-inline">
								<label class="layui-form-mid">状态：</label>
								<div class="layui-input-inline" style="width:100px;">
									<select name="status" class="fsSelect" isLoad="1" dict="status" addNull="1"></select>
								</div>
							</div>
							
							<div class="layui-inline">
								<label class="layui-form-mid">域名地区：</label>
								<div class="layui-input-inline" style="width:100px;">
									<select name="region" class="fsSelect" isLoad="1" dict="mailType" addNull="1"></select>
								</div>
							</div>
							
							<div class="layui-inline">
								<div class="layui-input-inline">
									<button class="layui-btn" type="button" function="query"><i class="layui-icon">&#xe615;</i>查询</button>
									<button class="layui-btn layui-btn-danger" type="reset" function="clean">清空</button>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
			
			<div class="layui-col-md12">
				<div class="layui-row grid-demo">
					<div class="layui-col-md12">
						<button class="layui-btn layui-btn-sm" function="top" topUrl="${ctx }/mail/conf/addView"
							topWidth="600px" topHeight="580px" isMaximize="0" topTitle="新增阿里云邮箱通道">
							<i class="layui-icon">&#xe654;</i>新增
						</button>
						<button class="layui-btn layui-btn-danger layui-btn-sm" function="submit"
							method="post" url="${ctx }/mail/conf/delAll" isMutiDml="1" isConfirm="1"
							confirmMsg="确定停用选中的数据吗？" inputs="accessKeyId:">
							<i class="layui-icon">&#xe640;</i>批量停用
						</button>
						<button class="layui-btn layui-btn-sm" function="refresh">
							<i class="layui-icon">&#x1002;</i>刷新
						</button>
					</div>
					
					<div class="layui-col-md12">
						<table id="fsDatagrid" lay-filter="fsDatagrid" class="fsDatagrid"
							isLoad="1" url="${ctx }/mail/conf/list" isPage="1" sortType="1"
							pageSize="10" defaultForm="query_form" height="full-135"></table>

						<div class="fsDatagridCols">
							<p checkbox="true" />
							<p field="sort" title="排序" width="80" sort="true" templet="#sortTemp" />
							<p field="accessKeyId" title="accessKeyId" width="200" sort="true"/>
							<p field="accessKeySecret" title="accessKeySecret" width="300" sort="true" />
							<p field="region" title="地区" width="200" sort="true" dict="mailType" />
							<p field="status" title="状态" width="100" sort="true" templet="#statusTemp" />
							<p field="notice" title="备注" width="320" sort="true"/>
							<p align="center" toolbar="#actionTemp" title="操作" width="220"/>
						</div>

						<script type="text/html" id="statusTemp">
							{{# if (d.status == 0){ }} 
								<span class="layui-badge layui-bg-blue">已启用</span>
							{{# }else{ }} 
								<span class="layui-badge layui-bg-danger">已禁用</span>
							{{# } }}
						</script>
						<script type="text/html" id="sortTemp">
							<span class="layui-badge">{{ d.sort }}</span>
						</script>
						<script type="text/html" id="actionTemp">
							<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="top" topUrl="${ctx }/mail/conf/detail" topMode="readonly" topWidth="650px" topHeight="500px" topTitle="查看阿里云邮箱通道" inputs="accessKeyId:">查看</a>
				 			<a class="layui-btn layui-btn-xs" lay-event="top" topUrl="${ctx }/mail/conf/addView" topWidth="600px" topHeight="580px" topTitle="编辑阿里云邮箱通道" inputs="accessKeyId:">编辑</a>
{{# if (d.status == 0){ }}
	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="${ctx }/mail/conf/del" isConfirm="1" method="post" confirmMsg="确定停用当前记录吗？" inputs="accessKeyId:,status:9">停用</a>
{{# }else{ }}
	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="${ctx }/mail/conf/del" isConfirm="1" method="post" confirmMsg="确定启用当前记录吗？" inputs="accessKeyId:,status:0">启用</a>
{{# } }}
							</script>
						 
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<%@ include file="/WEB-INF/common/bottom.jsp"%>
